#! /usr/bin/python
import logging
import os

class Logger:

    def __init__(self):
      self.FileHandler = None
      self.PrintBuffer = '' 

    def info(self, _str):
        print("%s"%(_str))
        self.PrintBuffer = "%s%s\n"%(self.PrintBuffer, _str)

class ISA_BASE(object):

    def __init__(self):
        self.opcodes = {}
        self.logger = Logger()


    def setFile(self, _file):
        if os.path.isfile(_file):
            os.remove(_file)
        self.logger.FileHandler = _file

    def getFile(self):
        with open(self.logger.FileHandler, "w") as aFile:
            aFile.write(self.logger.PrintBuffer)
            aFile.close()
